package com.jsmile.cloud.accountcenter.api.feign;

import javax.validation.Valid;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.jsmile.cloud.accountcenter.api.constants.AccountConstants;
import com.jsmile.cloud.accountcenter.api.req.ReqMemberDetial;
import com.jsmile.cloud.accountcenter.api.req.account.ReqMemberQuery;
import com.jsmile.cloud.accountcenter.api.res.ResMember;
import com.jsmile.mall.api.JSmileResult;
import com.jsmile.mall.api.to.JsmilePage;

@FeignClient(value = AccountConstants.APPLICATION_NAME, contextId = "member")
public interface MemberServiceApi {

    // TODO 获取租户信息
    @RequestMapping(value = "/feign/member/getMember", method = RequestMethod.POST)
    JSmileResult<ResMember> getMember(@RequestBody @Valid ReqMemberDetial reqMemberDetial);

    // TODO 获取会员列表
    @RequestMapping(value = "/feign/member/getMemberPageList", method = RequestMethod.POST)
    JSmileResult<JsmilePage<ResMember>> getMemberPageList(@RequestBody @Valid ReqMemberQuery reqMemberQuery);
}
